3.50 \(\int \sqrt {a \sec ^2(x)} \, dx\)

Optimal. Leaf size=25 \[ \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \tan (x)}{\sqrt {a \sec ^2(x)}}\right ) \]

[Out]

arctanh(a^(1/2)*tan(x)/(a*sec(x)^2)^(1/2))*a^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {4122, 217, 206} \[ \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \tan (x)}{\sqrt {a \sec ^2(x)}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a*Sec[x]^2],x]

[Out]

Sqrt[a]*ArcTanh[(Sqrt[a]*Tan[x])/Sqrt[a*Sec[x]^2]]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 4122

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(b*ff)
/f, Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps

\begin {align*} \int \sqrt {a \sec ^2(x)} \, dx &=a \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+a x^2}} \, dx,x,\tan (x)\right )\\ &=a \operatorname {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {\tan (x)}{\sqrt {a \sec ^2(x)}}\right )\\ &=\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \tan (x)}{\sqrt {a \sec ^2(x)}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 46, normalized size = 1.84 \[ \cos (x) \sqrt {a \sec ^2(x)} \left (\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a*Sec[x]^2],x]

[Out]

Cos[x]*(-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]])*Sqrt[a*Sec[x]^2]

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 55, normalized size = 2.20 \[ \left [-\frac {1}{2} \, \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) \log \left (-\frac {\sin \relax (x) - 1}{\sin \relax (x) + 1}\right ), -\sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a}{\cos \relax (x)^{2}}} \cos \relax (x) \sin \relax (x)}{a}\right )\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/2*sqrt(a/cos(x)^2)*cos(x)*log(-(sin(x) - 1)/(sin(x) + 1)), -sqrt(-a)*arctan(sqrt(-a)*sqrt(a/cos(x)^2)*cos(
x)*sin(x)/a)]

________________________________________________________________________________________

giac [A]  time = 0.33, size = 31, normalized size = 1.24 \[ \frac {1}{4} \, \sqrt {a} {\left (\log \left ({\left | \frac {1}{\sin \relax (x)} + \sin \relax (x) + 2 \right |}\right ) - \log \left ({\left | \frac {1}{\sin \relax (x)} + \sin \relax (x) - 2 \right |}\right )\right )} \mathrm {sgn}\left (\cos \relax (x)\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(a)*(log(abs(1/sin(x) + sin(x) + 2)) - log(abs(1/sin(x) + sin(x) - 2)))*sgn(cos(x))

________________________________________________________________________________________

maple [A]  time = 0.38, size = 23, normalized size = 0.92 \[ -2 \cos \relax (x ) \sqrt {\frac {a}{\cos \relax (x )^{2}}}\, \arctanh \left (\frac {-1+\cos \relax (x )}{\sin \relax (x )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*sec(x)^2)^(1/2),x)

[Out]

-2*cos(x)*(a/cos(x)^2)^(1/2)*arctanh((-1+cos(x))/sin(x))

________________________________________________________________________________________

maxima [A]  time = 0.89, size = 38, normalized size = 1.52 \[ \frac {1}{2} \, \sqrt {a} {\left (\log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \sin \relax (x) + 1\right ) - \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(a)*(log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) - log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.04 \[ \int \sqrt {\frac {a}{{\cos \relax (x)}^2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a/cos(x)^2)^(1/2),x)

[Out]

int((a/cos(x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \sec ^{2}{\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)**2)**(1/2),x)

[Out]

Integral(sqrt(a*sec(x)**2), x)

________________________________________________________________________________________